﻿<UserControl x:Class="GameFrameLibrary.Frames.LoadFrame"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:input="clr-namespace:Prism.Games.GalEngine.Scripts.Parser.Input;assembly=InputModel"
             xmlns:my="clr-namespace:GameFrameLibrary"
             mc:Ignorable="d" 
             d:DesignHeight="576" d:DesignWidth="1024">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="SharedStyles.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <UserControl.InputBindings>
        <MouseBinding MouseAction="RightClick" Command="input:GameCommands.Back" />
    </UserControl.InputBindings>
    <Grid Name="GameLayout" >
        <Grid Name="LoadLayout">
            <Grid Name="BackgroundImageLayout">
                <Grid.Background>
                    <ImageBrush x:Name="BackgroundImage" />
                </Grid.Background>
                <Grid >
                    <Grid.Background>
                        <SolidColorBrush Color="Black" Opacity="0.65" />
                    </Grid.Background>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Grid Grid.Row="0" Background="{StaticResource CommonBackgroundBrush}">
                        <TextBlock Text="    Load    " FontSize="30" Margin="10" HorizontalAlignment="Left" />
                    </Grid>
                    <Grid Grid.Row="1">
                        <my:DataBox x:Name="LoadDataListBox" />
                        <!--<ListBox Name="LoadDataListBox" ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Disabled" >
                            <ListBox.ItemTemplate>
                                <DataTemplate>
                                    <Grid MouseEnter="Button_MouseEnter">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition />
                                            <ColumnDefinition Width="Auto" />
                                        </Grid.ColumnDefinitions>


                                        <TextBlock Foreground="{StaticResource CommonTextBrush}" Grid.Column="0" Text="{Binding State.GamingScene.Role.Name}" TextWrapping="Wrap" FontSize="20" Margin="5" />
                                        <TextBlock Foreground="{StaticResource CommonTextBrush}" Grid.Column="1" Text="{Binding State.GamingScene.Dialogue.Text}" TextWrapping="Wrap" FontSize="20" Margin="5" HorizontalAlignment="Stretch" />
                                        <TextBlock Foreground="{StaticResource CommonTextBrush}" Grid.Column="2" Text="{Binding CreateTime}" FontSize="16" Margin="5" HorizontalAlignment="Right" />

                                        <Grid.ToolTip>
                                            <ToolTip Background="Transparent">
                                                <Grid>
                                                    <Image Grid.Column="0" Source="{Binding ShotCut}" Height="300"  Margin="5" />
                                                </Grid>
                                            </ToolTip>
                                        </Grid.ToolTip>

                                    </Grid>
                                </DataTemplate>
                            </ListBox.ItemTemplate>
                        </ListBox>-->
                    </Grid>
                    <Grid Grid.Row="2">
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                            <Button Margin="5" Width="150"  Command="input:GameCommands.Load" 
                                    Name="LoadButton" MouseEnter="Button_MouseEnter" Click="LoadButton_Click" >
                                <Button.Content>
                                    <TextBlock Text="    Load    " />
                                    <!--<Image Source="Images/SLLoad.png" />-->
                                </Button.Content>
                            </Button>
                            <Button Margin="5" Width="150" Command="input:GameCommands.Title" MouseEnter="Button_MouseEnter" >
                                <Button.Content>
                                    <TextBlock Text="    Title    " />
                                    <!--<Image Source="Images/SLTitle.png" />-->
                                </Button.Content>
                            </Button>
                            <Button  Margin="5" Width="150" Command="input:GameCommands.Back" MouseEnter="Button_MouseEnter" >
                                <Button.Content>
                                    <TextBlock Text="    Back    " />
                                    <!--<Image Source="Images/SLBack.png" />-->
                                </Button.Content>
                            </Button>
                        </StackPanel>
                    </Grid>
                </Grid>
            </Grid>
        </Grid>

    </Grid>
</UserControl>
